<template>
	<div class="cart_body" @click='toDetail'>
		<div class='cart_title'>
			<p>快递单号：{{content.fastMailNo}}</p>
			<p>{{content.comName}}</p>
		</div>
		<view class="cart_body_min">
			<div class="cart_left"><img :src="imgUrl + content.goodsImg" /></div>
			<div class="cart_right">
				<p>商品款号：{{ content.goodsItemNo }}</p>
				<p>商品名称：{{ content.goodsName }}</p>
				<p>工单号：{{ content.workNo }}</p>
			</div>
		</view>
		<view class="cart_body_bottom">
			<div >
				<p class='city'>{{ content.fromAddr }}</p>
				<p>{{ content.mailPersonName }}</p>
			</div>
			<div >
				<p class='type'>{{ content.state == 1?'运输中':'已签收' }}</p>
				<p><img  :src="kdImg"></p>
			</div>
			<div >
				<p class='city'>{{ content.toAddr }}</p>
				<p>{{ content.receivePersonName }}</p>
			</div>
		</view>
		<view class="time">发出时间：{{content.createTime}}</view>
	</div>
</template>

<script>
	import kdImg from '@/static/image/kd.png'
export default {
	props: ['content'],
	data() {
		return {
			kdImg,
			imgUrl: this.$imgUrl
		};
	},
	methods: {
		toDetail(){
			uni.navigateTo({
				url: `./expressDetail/expressDetail?nu=${this.content.fastMailNo}`
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.cart_body {
	background: #fff;
	padding: 20rpx 40rpx;
	margin: 0 30rpx;
	margin-bottom: 20rpx;
	border-radius: 10rpx;
	.cart_title{
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 20rpx;
		font-size: 26rpx;
		color: #444444;
	}
	.cart_body_min {
		display: flex;
		.cart_left {
			margin-right: 30rpx;
			img {
				border-radius: 10rpx;
				width: 120rpx;
				height: 120rpx;
			}
		}
		.cart_right {
			font-size: 24rpx;
			color: #777;
			display: flex;
			justify-content: space-between;
			padding: 0 0 10rpx 0;
			flex-direction: column;
			.title {
				font-weight: 500;
				color: #333;
				font-size: 28rpx;
			}
			p {
				span {
					margin-right: 30rpx;
				}
			}
		}
	}
	.cart_body_bottom{
		color: #444;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10rpx 60rpx;
		border-bottom:1rpx solid #f1f1f1;
		.city{
			font-size: 28rpx;
			font-weight: bold;
		}
		.type{
			color: #5880FF;
		}
		p{
			text-align: center;
			padding: 10rpx 0;
			img{
				width: 100rpx;
				height: 50rpx;
			}
		}
	}
	.time{
		font-size: 26rpx;
		color: #444;
		margin-top: 20rpx;
	}
}
</style>
